{% extends 'admin/dashboard.html' %}

{% block content %}
<div class="card">
    <h2 class="text-xl font-bold mb-4">添加案例</h2>
    <form method="post" enctype="multipart/form-data">
        <div class="mb-4">
            <label for="title" class="block text-sm font-medium text-gray-700">标题</label>
            <input type="text" id="title" name="title" required class="mt-1 p-2 w-full border rounded-md">
        </div>
        <div class="mb-4">
            <label for="description" class="block text-sm font-medium text-gray-700">描述</label>
            <textarea id="description" name="description" rows="4" required class="mt-1 p-2 w-full border rounded-md"></textarea>
        </div>
        <div class="mb-4">
            <label for="image" class="block text-sm font-medium text-gray-700">图片</label>
            <input type="file" id="image" name="image" class="mt-1 p-2 w-full">
        </div>
        <div class="mb-4">
            <label for="link_url" class="block text-sm font-medium text-gray-700">链接</label>
            <input type="text" id="link_url" name="link_url" class="mt-1 p-2 w-full border rounded-md">
        </div>
        <button type="submit" class="px-4 py-2 bg-primary text-white rounded">提交</button>
    </form>
</div>
{% endblock %}